use salvo::prelude::*;
use crate::api::controller::*;

/// 构建API路由器
pub fn api_router() -> Router {
    Router::with_path("api/v1")
        .push(dict_router())
}

/// 字典管理路由
fn dict_router() -> Router {
    Router::with_path("dict")
        .get(get_dict_data)
        .post(create_dict_item)
        .push(
            Router::with_path("types")
                .get(get_dict_types)
        )
} 